package com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.control;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.service.LearnCommonRemoteService;

//import com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.service.model.CreateOrUpdateSpModel;
import com.fosun.spr.core.base.CoBaseControl;


import com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.service.model.List_v2_userSpModel;
import com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.service.model.List_v2_userSrModel;


import com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.service.model.List_v2_tbshopSpModel;
import com.fosun.spr.plugin.learn.webservcie.api.learnCommonRemote.service.model.List_v2_tbshopSrModel;

@RestController
public class LearnCommonRemoteControl extends CoBaseControl {
	@Resource
	private LearnCommonRemoteService learnCommonRemoteService;

	/**
	 * http://127.0.0.1:8080/spr_boot_demo/api/learnCommonRemote/list_v2_user
	 * http://127.0.0.1:8081/api/learnCommonRemote/list_v2_user
	 * 
	 * @param request
	 * @param spModel
	 * @return
	 */	
	@RequestMapping(value = "/api/learnCommonRemote/list_v2_user",method = RequestMethod.GET)
	public List_v2_userSrModel list_v2_user(HttpServletRequest request, List_v2_userSpModel spModel) {
		//SessionUtils.fillSpModel(request, spModel);
		List_v2_userSrModel srModel = learnCommonRemoteService.list_v2_user(spModel);
		return srModel;
	}
	/**
	 * http://127.0.0.1:8080/spr_boot_demo/api/learnCommonRemote/list_v2_tbshop
	 * http://127.0.0.1:8081/api/learnCommonRemote/list_v2_tbshop
	 * 
	 * @param request
	 * @param spModel
	 * @return
	 */	
	@RequestMapping(value = "/api/learnCommonRemote/list_v2_tbshop",method = RequestMethod.GET)
	public List_v2_tbshopSrModel list_v2_tbshop(HttpServletRequest request, List_v2_tbshopSpModel spModel) {
		//SessionUtils.fillSpModel(request, spModel);
		List_v2_tbshopSrModel srModel = learnCommonRemoteService.list_v2_tbshop(spModel);
		return srModel;
	}
	
	
	//生成成json的代码
	public static void main(String[] args) throws Exception{
	}	
}
